class Solution(object):
    def hammingWeight(self, n):
        """
        :type n: int
        :rtype: int
        """
        return bin(n).count('1')

if __name__ == '__main__':
    s = Solution()
    n = 128
    print(s.hammingWeight(n))

        